/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package haw.pr2.A2a.implementations;

import haw.pr2.A2a.interfaces.Acc;

/**
 *
 * @author Fabian Heidorn, Alexander Kaack
 */
public class AccInMS extends AbstractScalar<Acc> implements Acc{
    private final double accInMS;
    
    public AccInMS(double accInMS) {
     this.accInMS=accInMS;
    }

    @Override
    public Acc inverse() {
        return new AccInMS(-this.ms2());
    }

    @Override
    public Acc add(Acc value) {
        return new AccInMS(this.ms2()+value.ms2());
    }

    @Override
    public Acc sub(Acc value) {
        return new AccInMS(this.ms2()-value.ms2());
    }

    @Override
    public Acc mul(Acc value) {
        return new AccInMS(this.ms2()*value.ms2());
    }

    @Override
    public Acc div(double value) {
        return new AccInMS(this.ms2()/value);
    }

    @Override
    public double div(Acc value) {
        return this.ms2()/value.ms2();
    }

    @Override
    public boolean isZero() {
        return this.ms2()==ZERO_ACC.ms2();
    }

    @Override
    public boolean isValid() {
        return true;
    }

    @Override
    public double ms2() {
        return this.accInMS;
    }

}
